
/**
 *  \file att_fsm_defines.h
 *
 *  This file defines state and events related to ATT FSM.
 */

/*
 *  Copyright (C) 2013. Mindtree Ltd.
 *  All rights reserved.
 */

#ifndef _H_ATT_FSM_DEFINES_
#define _H_ATT_FSM_DEFINES_

/* --------------------------------------------- Header File Inclusion */
#include "BT_att_api.h"
#include "fsm_defines.h"

#define ATT_MAX_NUM_EVENTS     8

extern DECL_CONST STATE_EVENT_TABLE att_state_event_table[];
extern DECL_CONST EVENT_HANDLER_TABLE att_event_handler_table[];

/* --------------------------------------------- Structures/Data Types */

typedef struct
{
    /* Event Data  */
    UCHAR              * data_param;

    /* ATT Handle */
    ATT_HANDLE          instance;

    /* Event Data Length */
    UINT16              data_len;

    /* Event */
    EVENT_T             event_type;

    /* ATT PDU Op Code */
    UCHAR               att_pdu_opcode;

    /* Indicated whether the event is peer or application initiated */
    UCHAR               direction;

}ATT_EVENT_INFO;

/* --------------------------------------------- Functions */

API_RESULT att_access_state_handler (void * param, STATE_T * state);


#endif /* _H_ATT_FSM_DEFINES_ */

